* @return BagOStuff
* @throws InvalidArgumentException
*/
- public static function newFromId( $id ) {
+ private static function newFromId( $id ) {
global $wgObjectCaches;
if ( !isset( $wgObjectCaches[$id] ) ) {
*
* @return string
*/
- public static function getDefaultKeyspace() {
+ private static function getDefaultKeyspace() {
global $wgCachePrefix;
$keyspace = $wgCachePrefix;
} elseif ( isset( $params['class'] ) ) {
$class = $params['class'];
// Automatically set the 'async' update handler
- $params['asyncHandler'] = $params['asyncHandler'] ?? 'DeferredUpdates::addCallableUpdate';
+ $params['asyncHandler'] = $params['asyncHandler']
+ ?? [ DeferredUpdates::class, 'addCallableUpdate' ];
// Enable reportDupes by default
$params['reportDupes'] = $params['reportDupes'] ?? true;
// Do b/c logic for SqlBagOStuff
* @return WANObjectCache
* @throws UnexpectedValueException
*/
- public static function newWANCacheFromId( $id ) {
+ private static function newWANCacheFromId( $id ) {
global $wgWANObjectCaches, $wgObjectCaches;
if ( !isset( $wgWANObjectCaches[$id] ) ) {